package com.jianqiao.delivery.pay.domain.confirmr2p;

import lombok.Data;

/**
 * author: cyx
 * create: 2024/11/25 9:06
 **/
@Data
public class CreditorAccountDetailEntity {
    private String primaryAccountNumber;

    private String receivingAlias;

    private String receivingAliasType;

    public CreditorAccountDetailEntity(String primaryAccountNumber, String receivingAlias, String receivingAliasType) {
        this.primaryAccountNumber = primaryAccountNumber;
        this.receivingAlias = receivingAlias;
        this.receivingAliasType = receivingAliasType;
    }

    public static CreditorAccountDetailEntityBuild builder() {
        return new CreditorAccountDetailEntityBuild();
    }

    public static class CreditorAccountDetailEntityBuild {
        private String primaryAccountNumber;

        private String receivingAlias;

        private String receivingAliasType;

        CreditorAccountDetailEntityBuild() {

        }

        public CreditorAccountDetailEntityBuild primaryAccountNumber(final String primaryAccountNumber) {
            this.primaryAccountNumber = primaryAccountNumber;
            return this;
        }

        public CreditorAccountDetailEntityBuild receivingAlias(final String receivingAlias) {
            this.receivingAlias = receivingAlias;
            return this;
        }

        public CreditorAccountDetailEntityBuild receivingAliasType(final String receivingAliasType) {
            this.receivingAliasType = receivingAliasType;
            return this;
        }

        public CreditorAccountDetailEntity build() {
            return new CreditorAccountDetailEntity(this.primaryAccountNumber ,
                                                   this.receivingAlias ,
                                                   this.receivingAliasType);
        }
    }
}
